import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

// 引入注册的全局组件
import footer from '@/components/common/Footer.vue'
import header from '@/components/common/Header.vue'
import title from '@/components/common/Title.vue'
import searchBox from '@/components/common/SearchBox.vue'
import excellentBox from '@/components/common/ExcellentBox.vue'
import askFor from '@/components/common/AskFor.vue'
import newRecource from '@/components/common/NewRecource.vue'
import swipper from '@/components/common/Swipper.vue'
Vue.component("footers",footer)
Vue.component("headers",header)
Vue.component("titles",title)
Vue.component("searchBox",searchBox)
Vue.component("excellentBox",excellentBox)
Vue.component("askFor",askFor)
Vue.component("newRecource",newRecource)
Vue.component("swipper",swipper)
import Vuecookie from 'vue-cookies'
Vue.use(Vuecookie)

Vue.use(ElementUI);



router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})



Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
